home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
ctutord.EXE
/
23.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-09-17
|
546b
|
40 lines
/*
There may be additional include files required depending
upon the compile product you are using. Typical compilers
include Microsoft C by Microsoft or Turbo C by Boland Int'l.
*/
#include <stdio.h>
main()
{
int a=1, b=1;
if( a < b )
a=1;
else if( a == b )
a=0;
printf("a is %d\n",a);
/* OR */
if( a < b )
a=1;
else if( a == b )
a=0;
else
a=2;
printf("a is %d\n",a);
/* OR */
if( a < b )
a=1;
else if( a == b )
a=2;
else if( a > b )
a=3;
printf("a is %d\n",a);
}